import { RedPacketComponent } from './red-packet/red-packet.component';
import { SharedGoodsComponent } from './shared-goods/shared-goods.component';
import { ErrorComponent } from './error/error.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
  { path: 'red-packet', component: RedPacketComponent },
  { path: 'shared-goods', component: SharedGoodsComponent },
  { path: '', redirectTo: '/shared-goods', pathMatch: 'full' }, //重定向路由
  {	path: '**', component: ErrorComponent}
];

@NgModule({
  imports: [RouterModule.forRoot(routes, { useHash: true })],
  exports: [RouterModule]
})
export class AppRoutingModule { }
